Investments

Kevin Crotty

Portfolio Statistics

Portfolios

-Portfolio are combinations of underlying assets
-Given return properties of the underlying assets, what are the return properties of their combination?

Expected Return of Portfolio of \(N\) Assets

\[ E[r_p] = \sum_{i=1}^{N} w_i E[r_i] \]

-\(w_i\) is the portfolio weight of asset \(i\)
-\(E[r_i]\) is the expected return of asset \(i\)
-The portfolio is fully invested: \(\sum_i w_i = 1\)
-Notation: \(E(r_p)=\mu_i\)

Variance of Portfolio of \(N\) Assets

\[ \text{var}[r_p] = \sum_{i=1}^{N} \sum_{j=1}^{N} w_i w_j \text{cov}[r_i,r_j] \]

-\(w_i\) is the portfolio weight of asset \(i\)
-\(\text{cov}[r_i,r_j]\) is the covariance between assets \(i\) and \(j\)
-Recall that \(\text{cov}[r_i,r_j]=\text{var}[r_i]\) and \(\text{sd}[r_i]=\sqrt{\text{var}[r_i]}\)
-Notation: \(\text{var}[r_p]=\sigma^2_p\); \(\text{cov}[r_i,r_j]=\sigma_{i,j}\); \(\text{sd}[r_p]=\sigma_p\)

Variance of Portfolio of \(N\) Assets: A Matrix View

\[ \text{var}[r_p] = \sum_{i=1}^{N} \sum_{j=1}^{N} w_i w_j \text{cov}[r_i,r_j] \]

\(w_1 w_1 \text{cov}[r_1,r_1]\) \(w_1 w_2 \text{cov}[r_1,r_2]\) \(w_1 w_3 \text{cov}[r_1,r_3]\)
\(w_2 w_1 \text{cov}[r_2,r_1]\) \(w_2 w_2 \text{cov}[r_2,r_2]\) \(w_2 w_3 \text{cov}[r_2,r_3]\)
\(w_3 w_1 \text{cov}[r_3,r_1]\) \(w_3 w_2 \text{cov}[r_3,r_2]\) \(w_3 w_3 \text{cov}[r_3,r_3]\)

Variance of Portfolio of \(N\) Assets: A Matrix View

\[ \text{var}[r_p] = \sum_{i=1}^{N} \sum_{j=1}^{N} w_i w_j \text{cov}[r_i,r_j] \]

\(w_1^2 \text{var}[r_1]\) \(w_1 w_2 \text{cov}[r_1,r_2]\) \(w_1 w_3 \text{cov}[r_1,r_3]\)
\(w_2 w_1 \text{cov}[r_2,r_1]\) \(w_2^2 \text{var}[r_2]\) \(w_2 w_3 \text{cov}[r_2,r_3]\)
\(w_3 w_1 \text{cov}[r_3,r_1]\) \(w_3 w_2 \text{cov}[r_3,r_2]\) \(w_3^2 \text{var}[r_3]\)

Variance of Portfolio of \(N\) Assets: A Matrix View

\[ \text{var}[r_p] = \sum_{i=1}^{N} w_i^2 \text{var}[r_i]+ 2 \sum_{j>i} w_i w_j \text{cov}[r_i,r_j] \]

\(w_1^2 \text{var}[r_1]\) \(w_1 w_2 \text{cov}[r_1,r_2]\) \(w_1 w_3 \text{cov}[r_1,r_3]\)
\(w_2 w_1 \text{cov}[r_2,r_1]\) \(w_2^2 \text{var}[r_2]\) \(w_2 w_3 \text{cov}[r_2,r_3]\)
\(w_3 w_1 \text{cov}[r_3,r_1]\) \(w_3 w_2 \text{cov}[r_3,r_2]\) \(w_3^2 \text{var}[r_3]\)

Example: Equal-weighted portfolio of two assets

-Expected Return

\[\begin{align} E[r_p] =& w_1 E[r_1] + w_2 E[r_2] \\ =& 0.5 E[r_1] + 0.5 E[r_2] \\ \end{align}\]

-Portfolio Variance

\[\begin{align} \text{var}[r_p] =& w_1^2 \text{var}[r_1]+ w_2^2 \text{var}[r_2]+ 2 w_1 w_2 \text{cov}[r_1,r_2] \\ =& 0.5^2 \text{var}[r_1]+ 0.5^2 \text{var}[r_2]+ 2\cdot 0.5\cdot 0.5 \text{cov}[r_1,r_2] \\ =& 0.25 \text{var}[r_1]+ 0.25 \text{var}[r_2]+ 0.5 \text{cov}[r_1,r_2] \\ \end{align}\]

Variance of Portfolio of \(N\) Assets: Matrices

\[ \text{var}[r_p] = \sum_{i=1}^{N} \sum_{j=1}^{N} w_i w_j \text{cov}[r_i,r_j] = w'Vw \]

-Portfolio weights vector:

\[w'=[w_1\, w_2\,...\,w_N]\]

-Covariance matrix of returns: \[\begin{equation*} V = \begin{bmatrix} \text{var}[r_1] & \text{cov}[r_1,r_2] & \dots & \text{cov}[r_1,r_N] \\ \text{cov}[r_2,r_1] & \text{var}[r_2] & \dots & \text{cov}[r_2,r_N] \\ \vdots & \vdots & \ddots & \vdots \\ \text{cov}[r_N,r_1] & \text{cov}[r_N,r_2] & \dots & \text{var}[r_N] \\ \end{bmatrix} \end{equation*}\]

Covariance and Correlation

-Covariance: absolute degree of co-movement between two assets
-Correlation: relative degree of co-movement between two assets

\[ \text{corr}[r_i,r_j] = \rho_{ij} = \frac{\text{cov}[r_i,r_j]}{\text{sd}[r_i]\cdot\text{sd}[r_j]} \]

-What are the possible values for \(\rho\)?

Diversification

Effects of Diversification

Claim: The variance of the return of a portfolio with many securities depends more on the covariances between the individual securities than on the variances of the individual securities.

\(w_1^2 \text{var}[r_1]\) \(w_1 w_2 \text{cov}[r_1,r_2]\) \(w_1 w_3 \text{cov}[r_1,r_3]\)
\(w_2 w_1 \text{cov}[r_2,r_1]\) \(w_2^2 \text{var}[r_2]\) \(w_2 w_3 \text{cov}[r_2,r_3]\)
\(w_3 w_1 \text{cov}[r_3,r_1]\) \(w_3 w_2 \text{cov}[r_3,r_2]\) \(w_3^2 \text{var}[r_3]\)

Now consider a five-security portfolio

How many variance terms?

\[N=5\]

How many covariance terms?

\[N^2-N = 25-5=20 \]

\(w_1^2 \text{var}[r_1]\) \(w_1 w_2 \text{cov}[r_1,r_2]\) \(w_1 w_3 \text{cov}[r_1,r_3]\) \(w_1 w_4 \text{cov}[r_1,r_4]\) \(w_1 w_5 \text{cov}[r_1,r_5]\)
\(w_2 w_1 \text{cov}[r_2,r_1]\) \(w_2^2 \text{var}[r_2]\) \(w_2 w_3 \text{cov}[r_2,r_3]\) \(w_2 w_4 \text{cov}[r_2,r_4]\) \(w_2 w_5 \text{cov}[r_2,r_5]\)
\(w_3 w_1 \text{cov}[r_3,r_1]\) \(w_3 w_2 \text{cov}[r_3,r_2]\) \(w_3^2 \text{var}[r_3]\) \(w_3 w_4 \text{cov}[r_3,r_4]\) \(w_3 w_5 \text{cov}[r_3,r_5]\)
\(w_4 w_1 \text{cov}[r_4,r_1]\) \(w_4 w_2 \text{cov}[r_4,r_2]\) \(w_4 w_3 \text{cov}[r_4,r_3]\) \(w_4^2 \text{var}[r_4]\) \(w_4 w_5 \text{cov}[r_4,r_5]\)
\(w_5 w_1 \text{cov}[r_5,r_1]\) \(w_5 w_2 \text{cov}[r_5,r_2]\) \(w_5 w_3 \text{cov}[r_5,r_3]\) \(w_5 w_4 \text{cov}[r_5,r_4]\) \(w_5^2 \text{var}[r_5]\)

Why does covariance dominate with large \(N\)?

-Consider an \(N\)-asset, equal-weighted portfolio \((w=1/N\))
-Assume all assets have the same variance \((\sigma^2_{\text{all}})\)
-Assume all pairs of assets have the same covariance \((\overline{\text{cov}})\)
-What is the variance of the portfolio?

\[\begin{align*} \text{var}(r_p) =& N\cdot \left(\frac{1}{N}\right)^2 \sigma^2_{\text{all}} + (N^2-N)\cdot \left(\frac{1}{N}\right)^2 \overline{\text{cov}} \\ =& \left(\frac{1}{N}\right) \sigma^2_{\text{all}} + \left(\frac{N-1}{N}\right) \overline{\text{cov}} \end{align*}\]

What happens to this as N gets large?

\[ \text{var}(r_p) \underset{N\rightarrow \infty}{\longrightarrow} 0\cdot\sigma^2_{\text{all}}+(1-0)\overline{\text{cov}}=\overline{\text{cov}} \]

Diversification curves

-Diversification eliminates some, but not all, of the risk of individual assets.
-In large portfolios, \(\text{var}[r_i]\)’s effectively diversified away, but not \(\text{cov}[r_i,r_j]\)’s.
-Diversifiable, non-systematic, idiosyncratic risk vs. non-diversifiable, systematic, market risk

Diversification curves

INSERT PLOTS OR WEBPAGE OF EMPIRICAL DIVERSIFICATION CURVES?

Preferences

Which return series do you prefer?

Code
import numpy as np
import pandas as pd
from scipy.stats import norm
import plotly.express as px
import plotly.io as pio
pio.renderers.default='notebook'

# Parameters
mn1 = 0.15
sd1 = 0.10
mn2 = 0.35
sd2 = 0.10
T = 50

# Generate data
rv1   = norm(loc=mn1, scale=sd1).rvs(T)
rv2   = norm(loc=mn2, scale=sd2).rvs(T)
time  = np.arange(T)
df = pd.DataFrame(data={'time': time, 'ret1': rv1, 'ret2': rv2})

# Plot data
fig = px.line(df,x='time', y=['ret1', 'ret2'])
fig.update_layout(yaxis_title='Return',
                  xaxis_title='',
    legend_title_text='',
)
fig.show()

Which return series do you prefer?

Code
import numpy as np
import pandas as pd
from scipy.stats import norm
import plotly.express as px
import plotly.io as pio
pio.renderers.default='notebook'

# Parameters
mn1 = 0.20
sd1 = 0.10
mn2 = 0.20
sd2 = 0.40
T = 50

# Generate data
rv1   = norm(loc=mn1, scale=sd1).rvs(T)
rv2   = norm(loc=mn2, scale=sd2).rvs(T)
time  = np.arange(T)
df = pd.DataFrame(data={'time': time, 'ret1': rv1, 'ret2': rv2})

# Plot data
fig = px.line(df,x='time', y=['ret1', 'ret2'])
fig.update_layout(yaxis_title='Return',
                  xaxis_title='',
    legend_title_text='',
)
fig.show()

Which return series do you prefer?

Code
import numpy as np
import pandas as pd
from scipy.stats import norm
import plotly.express as px
import plotly.io as pio
pio.renderers.default='notebook'

# Parameters
mn1 = 0.20
sd1 = 0.10
mn2 = 0.40
sd2 = 0.40
T = 50

# Generate data
rv1   = norm(loc=mn1, scale=sd1).rvs(T)
rv2   = norm(loc=mn2, scale=sd2).rvs(T)
time  = np.arange(T)
df = pd.DataFrame(data={'time': time, 'ret1': rv1, 'ret2': rv2})

# Plot data
fig = px.line(df,x='time', y=['ret1', 'ret2'])
fig.update_layout(yaxis_title='Return',
                  xaxis_title='',
    legend_title_text='',
)
fig.show()
Code
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.set_xlim([0,0.5])
ax.set_ylim([0,0.25])
ax.set_ylabel(r'$E[r_p]$')
ax.set_xlabel(r'$SD[r_p]$')

# mn = np.arange(0,0.5,0.1)
# sd = np.arange(0,0.5,0.1)

# ax.plot(sd, sd*0, color='k')
# ax.plot(mn*0,mn, color='k')
Text(0.5, 0, '$SD[r_p]$')

Where would your portfolio like to live?

Efficient Frontier

-For a given target return, an efficient portfolio is the set of portfolio weights that minimize the portfolio’s risk (variance or standard deviation).

-Mathematically, choose portfolio weights to solve the following constrained optimization problem for each target return \(\mu_{\text{target}}\):

\[ \underset{w_1,w_2,\dots,w_N}{\text{min}} \text{var}[r_p]\]

subject to constraints: \(E[r_p]=\mu_{\text{target}}\) and \(\sum_i w_i=1\)

Adding a risk-free asset

What is the variance of combining a risky asset/portfolio with a risk-free asset? \[\begin{align} \text{var}[r_p] =& w_{\text{risky}}^2 \text{var}[r_{\text{risky}}]+ (1-w_{\text{risky}})^2 \text{var}[r_f]+ 2 w_{\text{risky}}(1-w_{\text{risky}}) \text{cov}[r_{\text{risky}},r_f] \\ =& w_{\text{risky}}^2 \text{var}[r_{\text{risky}}]+ (1-w_{\text{risky}})^2 \cdot 0 + 2 w_{\text{risky}}(1-w_{\text{risky}}) \cdot 0 \\ \text{sd}[r_p] =& |w_{\text{risky}}|\cdot \text{sd}[r_{\text{risky}}] \end{align}\]

Solving for \(w_{\text{risky}}\):

\[w_{\text{risky}}= \frac{\text{sd}[r_{\text{p}}]}{\text{sd}[r_{\text{risky}}] }\]

Adding a risk-free asset

What is the expected return of combining a risky asset/portfolio with a risk-free asset?
(Plug-in the expression for \(w_{\text{risky}}\))

\[\begin{align} E[r_p] =& w_{\text{risky}} E[r_{\text{risky}}]+ (1-w_{\text{risky}}) r_f \\ =& \frac{\text{sd}[r_{\text{p}}]}{\text{sd}[r_{\text{risky}}] }E[r_{\text{risky}}]+ (1-\frac{\text{sd}[r_{\text{p}}]}{\text{sd}[r_{\text{risky}}] }) r_f \end{align}\]

Rearranging:

\[ \text{E}[r_p] = r_f + \bigg[ \frac{E[r_{\text{risky}}]-r_f}{\text{sd}[r_{\text{risky}}] }\bigg] \cdot \text{sd}[r_p] \]

The slope term in brackets is called the Sharpe ratio!

The Tangency Portfolio Problem

Given a risk-free asset, the optimal risky portfolio is the set of weights that maximizes the portfolio’s Sharpe ratio.

Mathematically, choose portfolio weights to solve the following constrained optimization problem:

\[ \underset{w_1,w_2,\dots,w_N}{\text{max}} \frac{E[r_p]-r_f}{\text{sd}[r_p]} \]

subject to constraints: \(\sum_i w_i=1\)

What about the three-asset case?

Mean-Variance Utility

\[ U(r_p)=E[r_p] - 0.5\cdot A \cdot \text{var}[r_p] \]

where \(A\) represents an investor’s risk aversion.

Investors may be indifferent between portfolios that generate the same utility:

Indifference Curves

ADD WEBPAGE WITH FOLLOWING

Code
import numpy as np
import pandas as pd
from scipy.stats import norm
import plotly.express as px
import plotly.io as pio
pio.renderers.default='notebook'

# Parameters
raver = 10
u1 = 0.05
u2 = 0.075
u3 = 0.10

# Generate data
sd = np.arange(0,0.405,0.005)
U1 = u1 + 0.5*raver* (sd**2)
U2 = u2 + 0.5*raver* (sd**2) 
U3 = u3 + 0.5*raver* (sd**2)
df = pd.DataFrame(data={'Standard Deviation': sd, 'Utility Level 1': U1, 'Utility Level 2': U2,'Utility Level 3': U3})
df = df*100

# Plot data
fig = px.line(df,x='Standard Deviation', y=['Utility Level 1', 'Utility Level 2', 'Utility Level 3'])
fig.update_layout(title='',
                   xaxis_title='Standard Deviation',
                   yaxis_title='Expected Return',
    legend_title_text='',)
fig.update_yaxes(tickformat=".0f", ticksuffix="%")
fig.update_xaxes(tickformat=".0f", ticksuffix="%")
fig.show()

Preferences and the Capital Allocation Line

Location on CAL depends on risk aversion!

Preferences and the Capital Allocation Line

Alternatively, some investors have a either a target expected return or target standard deviation.
If we have a target expected return, solve for \(w_{\text{tangency}}\):

\[ E[r_p] = w_{\text{tangency}} \cdot E[r_{\text{tangency}}] + (1-w_{\text{tangency}}) \cdot r_f \]

If we have a target standard deviation, solve for \(w_{\text{tangency}}\):

\[ \text{sd}[r_p] = w_{\text{tangency}} \cdot \text{sd}[r_{\text{tangency}}] \]

The Global Minimum Variance Problem

The GMV portfolio is the risky portfolio with the smallest variance.

It is a set of portfolio weights that minimizes the portfolio variance.

Mathematically, choose portfolio weights to solve the following constrained optimization problem:

\[ \underset{w_1,w_2,\dots,w_N}{\text{min}} \text{var}[r_{p}] \]

subject to constraints: \(\sum_i w_i=1\)

ADD CODE HERE THAT PLOTS GMV (OR EDIT WEBPAGE)

SHORT-SALES PAGE IS TOO DETAILED HERE.

Practical Issues

Leverage constraints

Many investors (like me!) cannot borrow at the same rate at which they can lend.

In this case, the capital allocation line is not a straight line.

Short-selling constraints

Negative investment weights involve short-selling.

Each position’s weight is:

\[ w_i = \frac{\text{Value of Position}}{\text{Total Portfolio Value}} \]

Some investors cannot or choose not to short sell.

Sensitivity of portfolio weights to inputs (aka Garbage In=Garbage Out)

FROM YUHANG’S SLIDES, HOW FRENCH PORTFOLIO WGT CHANGES BASED ON THE INPUTS

COULD ALSO BE A HOMEWORK ASSIGNMENT

Inputs Must Be Estimated!1

Mean-variance optimization is quite sensitive to the input parameters.

Inputs:
-Set of expected returns for assets <br />

-Set of variances for assets <br />

-Set of covariances (correlations) across assets <br />

How good are we at estimating these things?

The Error-Maximization Problem

Mean-variance portfolio optimization:
-Will tilt too heavily toward assets with estimated expected returns above true expected returns \((\hat{\mu}>\mu)\)  

-Will tilt too heavily toward assets with diversification benefits greater than true benefits \((\widehat{\text{cov}}_{ij}<\text{cov}_{ij})\)  

-Often tries to short assets with diversification benefits lower than true benefits \((\widehat{\text{cov}}_{ij}>\text{cov}_{ij})\)

Performance of Historical Plug-in Estimators

ADD WEBPAGE DOING SIMULATION IN KEVIN’S NOTES BASED ON 5-ASSET ALLOCATION EXAMPLE

Strategies Dealing with Estimation Error

Shrinkage

  Shrink extreme inputs toward some more moderate input

Short-selling constraints:

  Prevent hedging positions due to overestimated covariances or underestimated expected returns

Maximum position limits

  Prevents overweighting due to overestimated \(E[r]\) or underestimated covariances

Strategies Dealing with Estimation Error

Apply models to infer expected returns

  Use market wgts to back out \(E[r_i]\)’s via CAPM (Black-Litterman)
  Use more advanced factor models to estiamte \(E[r_i]\)’s

Don’t even try to estimate some inputs

  Global minimum variance: assume all \(E[r_i]\)’s equal
  Risk parity: assume all \(E[r_i]\)’s equal and all \(\rho_{ij}=0\)
  Equal-weighted portfolio: assume all \(E[r_i]\)’s, \(\text{sd}[r_i]\)’s equal; all \(\rho_{ij}=0\)

Historical Performance

LINK TO OPTIMAL PORTFOLIOS OF STOCKS, BONDS, AND GOLD?

ADD SIMULATION WITH GMV/RISK PARITY/EW/VW?

Another Solution: Sort on Predictive Signals

We will see this later in the course

ADD TABLE OR LINK TO FACTOR INVESTING PAGE